<%@ page import="java.io.PrintWriter" %>
<%@ page import="com.tedu.web.UserDao" %>
<%@ page import="com.tedu.web.User" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: Alen
  Date: 2021/4/20
  Time: 22:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>显示列表</title>
</head>
<body>
<pre>
<%
    UserDao userDao = new UserDao();
//        User user = new User();
    try{
        ArrayList<User> list = userDao.userList();
        for(User user : list){
//            out.print(user.getId());
//            out.print(" " + user.getName());
//            out.print(" " + user.getPassword());
            out.println(user);
        }
    }catch (Exception e){
        e.printStackTrace();
    }
%>
</pre>

</body>
</html>
